(function(){

    main();

    function main() {
        axloader({
            load: [
                // 'http://127.0.0.1:5500/axlib/axlib.js',
                'http://ax.minicg.com/axlib.js',
            ],
            complete: inited
        });
    }

    function inited() {
		let axlib = new AxLib();
		axlib.layout(1);

        let mocked = {
            data: [
                { "state": "已跟进", "content": "希望能改善垃圾处理点的环境卫生", "date": "01-26" },
                { "state": "已跟进", "content": "村口电线杆被车撞歪了希望有人处理", "date": "01-26" },
                { "state": "已跟进", "content": "道路的积水问题什么时候能解决下", "date": "01-26" },
                { "state": "已跟进", "content": "住宅区附近工地凌晨时分发出大量噪音", "date": "01-26" },
                { "state": "已跟进", "content": "人行道两旁大树有树枝掉落危及路人安全", "date": "01-26" },
                { "state": "已跟进", "content": "希望能增加老年人公共康体设施", "date": "01-26" }
            ]
        };

		axlib.table($axure('@mylist'), mocked.data);
		console.log($axure('@mylist').getRepeaterData());
	}
	
	function testCloud() {
		let test1 = { a:11, b:22 };
		let test2 = { a:33, b:44 };
		let jsonbin = new JsonBin({
			bin: '6013be63b41a937c6d53a730',
			name: 'test1',
			apikey: '$2a$10$wz6/UXhv61GGKlfWSbeoHuoJx7RuOerPoEZcMPlub1ODM1WxtNZd2',
			secure: true,
			version: false
		});

		// jsonbin.create(test1, res=>{
		// 	console.log(res);
		// });
		
		// jsonbin.update(test2, res=>{
		// 	console.log(res);
		// });

		// jsonbin.read(res=>{
		// 	console.log(res);
		// });

		// jsonbin.delete(res=>{
		// 	console.log(res);
		// });
	}
}());